Conventionally, monitoring cameras are often installed in public spaces such as a street. An image obtained by shooting with the monitoring camera may include an area unnecessary for monitoring purposes. Further, from a viewpoint of privacy protection, it may be undesirable to acquire and store a still image or a moving image of such an unnecessary area. In order to cope with this, there is known a shooting system that shoots a range to be monitored with a monitoring camera and performs masking processing for a partial area of an image obtained by the monitoring camera for privacy protection (for example, see Patent Literature 1 (JP 3996805 B2) and Patent Literature 2 (U.S. Pat. No. 7,366,359)).
An omnidirectional camera provided with a fish-eye lens and thus capable of shooting an omnidirectional image is sometimes used as a monitoring camera. An angle of view in such an omnidirectional camera is about 360°, and an omnidirectional image having a circular shape or a doughnut shape is obtained. In this omnidirectional image, uneven distortion occurs depending on location. In order to facilitate visualization of the circular or doughnut shaped omnidirectional image on a rectangular viewer screen, distortion correction processing is performed for the omnidirectional image. Specifically, for example, a partial area of the omnidirectional image is cut out, and then distortion correction processing is performed for the cut-out image, or distortion correction processing is performed for the omnidirectional image to develop the omnidirectional image into a panoramic image.
FIG. 41A illustrates an example of the omnidirectional image, FIG. 41B illustrates an example in which cut-out/distortion-corrected images corresponding to a plurality of cut-out ranges are displayed in a juxtaposed manner, together with the omnidirectional image, and FIG. 41C illustrates a display example of a panoramic image corresponding to the omnidirectional image of FIG. 41A. As illustrated in FIGS. 41A to 41C, when the omnidirectional image is obtained, a plurality of ways of distortion correction processing can be performed for the omnidirectional image.
As described above, the conventional monitoring camera can arbitrarily specify the cut-out range in the omnidirectional image, i.e., a cut-out view angle and a cut-out position and obtain a cut-out/distortion-corrected image corresponding to the cut-out view angle and position. Further, during shooting of a moving image, the cut-out range can be changed in real time. For example, a configuration is possible, in which the cut-out range is changed so as to follow a moving object detected in an image and, at the same time, the cut-out/distortion-corrected image corresponding to the cut-out range is generated.
When the masking processing is performed for the partial area on the omnidirectional image, distortion is removed from an unmasking area by performing the distortion correction processing; however, the masking area assumes a distorted shape in the distortion-corrected image and looks horrible.
In a monitoring camera system of Patent Literature 1, the masking area is displayed in a rectangle. FIG. 18 is a view for explaining processing performed in Patent Literature 1. In the drawing, P1 to P4 are each a vertex of the masking area, and MLU, MRU, MLD, and MRD are each a vertex of a rectangle formed by horizontal and vertical lines circumscribed to a figure surrounded by P1 to P4. In the monitoring camera system of Patent Literature 1, when the masking area surrounded by the 21 to P4 is distorted in a case where a configuration of a signal generation section limits the masking shape to a rectangle formed by horizontal and vertical lines, the area surrounded by the MLU, MRU, MLD, and MRD which is circumscribed to the figure surrounded by P1 to P4 is masked.
The monitoring camera system of Patent Document 1 is only configured to mask the rectangle formed by horizontal and vertical lines circumscribed to the area to be masked which is surrounded by the P1 to P4 along the requirement of the signal generation section, but not configured to deform the shape of the masking area from a viewpoint of improving appearance. That is, it is not always true that masking of the rectangle formed by the horizontal and vertical lines circumscribed to the masking area surrounded by P1 to P4 results in good visibility.
Further, it is difficult for a user to imagine how a shape of a masking area that the user specifies on the image having distortion changes on the distortion-corrected image. Particularly, a correction parameter to be used in distortion correction processing differs depending on the cut-out range, so that even if a masking area having the same shape and located at the same position as previous one is specified on the image having distortion, when a plurality of different cut-out ranges is set, it is very difficult to estimate how the masking area is deformed by the distortion correction processing to be performed for the individual cut-out range.
In a technology described in Patent Literature 2, a processing range is specified on a distortion-corrected image, and the specified processing range is projected onto a coordinate of the image having distortion before distortion correction processing. However, when the processing range is specified by a method as described in Patent Literature 2, that specifies an arbitrary range on the image having distortion, a shape of the range changes depending on presence/absence of the distortion correction processing, a difference in display mode, or an image cut-out position. This complicates the range specification to be conducted by a user, and a position of the specified range is difficult to understand. Further, in the technology described in Patent Literature 2, it is necessary to project a large number of coordinates before and after the distortion correction processing and, accordingly, an amount of information to be processed becomes extremely large.
A purpose of the present technology is to provide an improved image processing apparatus and an improved image processing method for providing a distortion-corrected image including a masking area.
The present disclosure provides an image processing apparatus that includes: a masking area retaining section that retains a masking area set for an image having distortion; a masking processing section that performs masking processing for the image having distortion using the masking area of the masking area retaining section; a distortion correction section that corrects the image having distortion that is subjected to the masking processing using a correction parameter for correcting distortion of the image having distortion; and a masking area shaping section that shapes the masking area of the corrected image into a predetermined shape.
As described below, the present technology has other aspects. Therefore, the disclosure of the technology is intended to provide some of the aspects of the technology, and is not intended to limit the scope of the technology as described and claimed herein.